1 REM PROGRAM: GRAPHICS FACTORY 2 REM AUTHOR : MARCO H. WESTERWEEL 3 REM (C)1989, ALL RIGHTS RESERVED 4 REM HAAKSBERGEN, THE NETHERLANDS 5 : 10 PRINT"[147]":DIMSC$(23,38),S1$(23),GL$(54),CR$(46),D(255):DL$=CHR$(20) 15 Z$=" ":CY$="[156] ":RT$=CHR$(13):CL$="[156]" 20 RL$="":SQ$="" 25 BO=4:BA=15:CA=4:CX=0:PA=1:OP$=LEFT$(SQ$,16)+"COPY" 30 OP$=OP$+"MODIFY"+RT$+"CRUNCHREPLACE"+RT$+"SCRATCHVIEW" 35 R$(1)=LEFT$(SQ$,16)+"[146][144]COPY":R$(2)=LEFT$(SQ$,16)+LEFT$(RL$,11)+"[146][144]MODIFY" 40 R$(3)=SQ$+"[145][145][145][145][145][146][144]CRUNCH":R$(4)=SQ$+LEFT$(RL$,11)+"[145][145][145][145][145][146][144]REPLACE" 45 R$(5)=SQ$+"[145][145][146][144]SCRATCH":R$(6)=SQ$+LEFT$(RL$,11)+"[145][145][146][144]VIEW":CU$="[145][157]" 50 FORDD=1TO255:D(DD)=9:NEXT:FORDD=1TO6:READD2:D(D2)=DD:NEXT 55 FORDD=1TO16:READD2:D(D2)=7:NEXT:FORDD=135TO138:D(DD)=8:NEXT 60 FORDD=1TO41:READD2:D(D2)=10:NEXT 65 DATA 157,29,17,145,18,146,5,28,30,31,129,144,149,150,151,152,153,154,155 70 DATA 156,158,159,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,19,20,21,22,23,24,25 75 DATA 26,27,34,44,58,59,128,130,131,132,133,134,139,140,141,142,143,147,148 80 BO=4:BA=15:CA=4:CX=0:GOSUB585:GOSUB590:BL$=" " 85 PRINT"[146][144] SETTING UP... " 90 OPEN8,8,8,"0:GF/DIR,S,R":FORGL=1TO54:INPUT#8,GL$(GL) 95 IFGL$(GL)<>"*"THENLG=LG+1 100 NEXT:CLOSE8 105 FI$="CR/GF INTRO":GOSUB850:GOSUB870:FORW=1TO1500:NEXTW 110 OPEN8,8,8,"0:CR/GF MENU,S,R":FORS1=1TO23:INPUT#8,S1$:INPUT#8,S2$ 115 S1$(S1)=S1$+S2$:S1$="":S2$="":NEXT:CLOSE8:GOSUB590 120 PA=1:SQ=1:RL=1:QX=1:SX=1:RX=1:RV$="":CO$="[156]":HC$=" ":CH$="[156] " 125 CY$=SC$(1,1):PRINT"";:FORS1=1TO23:PRINT""S1$(S1):NEXT 130 PRINTSQ$"[156] USE [144]CRSR[156] & [144]RETURN[156] TO ENTER COMMANDS [145]" 135 IFCA$="C"THENIF(RO=7ORRO=2)THENCA$="":LG=LG-1 140 PRINT""SPC(35)"[146][144]NEW" 145 GETGT$:IFGT$<>RT$THENIFGT$<>"[157]"THEN145 150 IFGT$=RT$THENGOSUB510:RO=7:GOSUB360:IFCA$="C"THEN120 155 IFGT$=RT$THENIFCA$="A"THEN570 160 IFGT$="[157]"THENPRINT""SPC(30)"[146][144]OLDNEW":GOTO165 165 GETGT$:IFGT$<>RT$ANDGT$<>""THEN165 170 IFGT$=""THENPRINT""SPC(30)"OLD":GOTO140 175 IFGT$=RT$THENG2=1:G1=6:GOSUB340 180 PRINT""SPC(11)"[146][144]ADVANCE" 185 GETGT$:IFGT$<>RT$THENIFGT$<>""THENIFGT$<>"[157]"THEN185 190 IFGT$=RT$THENIFGL$(G1)<>"*"THENG1=G1+6:G2=G1-5:GOSUB340:GOTO185 195 IFGT$="[157]"THEN210 200 IFGT$=""THENTT=1:PRINT"REVERSEADVANCE":GOTO260 205 GOSUB340:GOTO185 210 PRINT"[146][144]REVERSEADVANCE" 215 GETGT$:IFGT$<>RT$THENIFGT$<>""THENIFGT$<>""THEN215 220 IFGT$=RT$THENG1=G1-6:G2=G1-5:GOSUB340:GOTO215 225 IFGT$=""THENPRINT"REVERSE":GOTO180 230 IFGT$=""THENTT=1:PRINT"REVERSEADVANCE":GOTO260 235 GETGT$:IFGT$<>""THENIFGT$<>"[145]"THENIFGT$<>RT$THEN235 240 IFGT$=""THENTT=TT+1:IFTT>6THENTT=6:GOTO260 245 IFGT$="[145]"THENTT=TT-1:IFTT<1THENTT=0:GOSUB355:GOTO180 250 IFGT$=RT$ANDGL$(FL)="*"THEN235 255 IFGT$=RT$THEN270 260 PRINTLEFT$(SQ$,8);:FORGX=G2TOG1:PRINT""GL$(GX):NEXT 265 FL=G2+TT-1:PRINTLEFT$(SQ$,7+TT)"[146][144]"GL$(FL):GOTO235 270 RO=1:PRINTR$(1) 275 TG=0:GETGT$:FORGT=1TO4:IFGT$=MID$(CU$,GT,1)THENTG=GT:GT=4 280 NEXT:IFGT$=RT$ANDRO<>2THENGOSUB360:IFCA$="C"THEN120 285 IFGT$=RT$THEN395 290 IFTG=0THEN275 295 ONTGGOTO300,310,320,330 300 RO=RO-2:IFRO<1THENRO=1 305 GOTO335 310 RO=RO+2:IFRO>6THENRO=6 315 GOTO335 320 RO=RO-1:IFRO<1THENRO=1 325 GOTO335 330 RO=RO+1:IFRO>6THENRO=6 335 PRINTOP$R$(RO):GOTO275 340 IFG1<6THENG1=6:G2=1:GOTO350 345 IFG1>53THENG1=54:G2=49 350 PRINTLEFT$(SQ$,8);:FORGL=1TO6:PRINTBL$:NEXT 355 PRINTLEFT$(SQ$,8);:FORGL=G2TOG1:PRINT""GL$(GL):NEXT:RETURN 360 PRINTSQ$SPC(24)"[145][145][146][144]CANCELACCEPT" 365 GETGT$:IFGT$<>RT$THENIFGT$<>""THEN365 370 IFGT$=RT$THENCA$="C":RETURN 375 IFGT$=""THENPRINTSQ$SPC(24)"[145][145]CANCEL[146][144]ACCEPT" 380 GETGT$:IFGT$<>RT$THENIFGT$<>"[157]"THEN380 385 IFGT$="[157]"THEN360 390 IFGT$=RT$THENCA$="A":RETURN 395 ONROGOTO460,400,915,495,445,425,570 400 IFLEFT$(GL$(FL),3)="CR/"THEN120 405 GOSUB510:FX$=FI$:IFLG=54THEN120 410 GOSUB360:IFCA$="C"THEN120 415 IFGL$(FL)<>F2$THENFI$=GL$(FL):GOSUB845 420 GOSUB870:GOTO605 425 IFGL$(FL)<>F2$THENFI$=GL$(FL):GOSUB845 430 GOSUB870 435 GETGT$:IFGT$<>CHR$(133)THEN435 440 GOSUB590:GOTO120 445 LG$=GL$(FL):LG=LG-1:IFLG=0THENLG=1:GOTO120 450 GOSUB590:PRINT"[146][144] SCRATCHING... ";LG$:GL$(FL)=GL$(LG+1):GL$(LG+1)="*" 455 OPEN15,8,15:PRINT#15,"S0:"+LG$:CLOSE15:GOSUB590:GOSUB830:GOTO120 460 IFLEFT$(GL$(FL),3)<>"CR/"THEN120 465 IFGL$(FL)<>F2$THENFI$=GL$(FL):GOSUB845 470 GOSUB590:PRINT"[156]...INSERT NEW DISK & PRESS"RT$"[144] C [156] TO COPY ";FI$ 475 GETC$:IFC$<>"C"THEN475 480 GOSUB785:PRINT"[156]...INSERT ORIGINAL DISK & PRESS [144]RETURN" 485 GETRR$:IFRR$<>RT$THEN485 490 GOSUB590:GOTO120 495 IFLEFT$(GL$(FL),3)="CR/"THEN120 500 IFGL$(FL)<>F2$THENFI$=GL$(FL):GOSUB845 505 GOSUB870:GOTO605 510 FI$="":LG=LG+1:IFLG=55THENLG=54:RETURN 515 PRINTSQ$"[156] [144]RETURN[156]:ACCEPTS NAME, [144]DEL[156]:DELETES NAME[145]" 520 PRINT""SPC(22)"[144][146]?[157]";:FORW=1TO100:NEXTW 525 PRINT"?[157]";:FORW=1TO100:NEXTW 530 GETNF$:IF(NF$<"A"ORNF$>"Z")AND(NF$<"0"ORNF$>"9")THEN520 535 IFLEN(FI$)<15THENPRINTNF$;:FI$=FI$+NF$:IFLEN(FI$)<15THENPRINT"[144][146]?[157]"; 540 GETNF$:IFNF$=RT$ANDLEN(FI$)<16THENPRINT" ":RETURN 545 IFNF$<>DL$THEN555 550 IFFI$<>""THENFI$=LEFT$(FI$,LEN(FI$)-1):PRINT"[144][146][157]? [157][157]";:IFFI$=""THEN520 555 IF(NF$>"/"ANDNF$<":")ORNF$=" "THEN535 560 IFNF$<"A"ORNF$>"Z"THEN540 565 GOTO535 570 GOSUB590:PRINT"[146][144] INITIALIZING... " 575 FORS1=1TO23:FORS2=1TO38:SC$(S1,S2)="[156] ":NEXT:NEXT:GOSUB585:GOSUB590 580 PRINT""CX$:CY$=SC$(1,1):GOSUB765:GOSUB895:GOTO605 585 POKE53280,BO:POKE53281,BA:CX$="[146][144]*":RETURN 590 ZX=0:PRINT"";:FORZ=1TO24:PRINTCL$" "Z$:ZX=ZX+40:POKE1023+ZX,160 595 POKE55295+ZX,CA:NEXT:PRINTCL$" "Z$"[145]":POKE2023,160:POKE56295,CA 600 RETURN 605 GETPC$:IFPC$=""THENGOSUB775:GOTO605 610 GP=D(ASC(PC$)):IFGP=10THEN605 615 ONGPGOSUB675,645,630,660,690,690,695,705,700 620 IFPC$=CHR$(137)THEN120 625 GOTO605 630 IFSQ<1ORSQ>22THEN640 635 SQ=SQ+1:GOSUB740 640 RETURN 645 IFRL<1ORRL>37THEN655 650 RL=RL+1:GOSUB740 655 RETURN 660 IFSQ<2ORSQ>24THEN670 665 SQ=SQ-1:GOSUB740 670 RETURN 675 IFRL<2ORRL>39THEN685 680 RL=RL-1:GOSUB740 685 RETURN 690 RV$=PC$:CH$=RV$+CO$+HC$:GOSUB765:RETURN 695 CO$=PC$:CH$=RV$+CO$+HC$:GOSUB765:RETURN 700 HC$=PC$:CH$=RV$+CO$+HC$:GOSUB765:RETURN 705 PG=ASC(PC$)-134:ONPGGOTO730,725,710,715 710 GOSUB785:GOSUB590:GOTO735 715 PRINTSQ$"[156] [146][144] GARBAGE COLLECTION [156]... PLEASE HOLD [145]":TH=FRE(0) 720 GOSUB870:GOTO735 725 PA=1:GOTO735 730 PA=2:GOSUB765 735 RETURN 740 QS=SQ:PRINTLEFT$(SQ$,SX)LEFT$(RL$,RX)CY$LEFT$(SQ$,SQ)LEFT$(RL$,RL)CX$ 745 SX=SQ:QX=QS:RX=RL:ONPAGOTO750,755 750 CY$=SC$(QX,RX):GOTO760 755 CY$=CH$:SC$(QX,RX)=CY$ 760 RETURN 765 PRINTLEFT$(SQ$,SQ)LEFT$(RL$,RL)CH$ 770 SC$(QX,RX)=CH$:CY$=SC$(QX,RX):RETURN 775 PRINTLEFT$(SQ$,SQ)LEFT$(RL$,RL)CX$:FORW=1TO100:NEXTW 780 PRINTLEFT$(SQ$,SQ)LEFT$(RL$,RL)CY$:FORW=1TO100:NEXTW:RETURN 785 GOSUB590:IFRO=2THENFI$=FX$:FX$="":GOTO795 790 IFRO=4THENDN$=FI$:FI$="REPLACEMENT FILE" 795 PRINT"[146][144] SAVING... ";FI$" ":OPEN8,8,8,"0:"+FI$+",S,W" 800 IFLEFT$(FI$,3)="CR/"THENFORCR=1TO46:PRINT#8,CR$(CR):NEXT:GOTO810 805 FORS1=1TO23:FORS2=1TO38:PRINT#8,SC$(S1,S2):NEXT:NEXT 810 CLOSE8:IFRO<>4THENIFRO<>1THENGL$(LG)=FI$:GOSUB830:GOTO825 815 IFRO=1THEN825 820 OPEN15,8,15:PRINT#15,"S0:"+DN$:PRINT#15,"R0:"+DN$+"="+FI$:CLOSE15:FI$=DN$ 825 F2$=FI$:RETURN 830 OPEN8,8,8,"0:DUMMY NAME,S,W":FORGL=1TO54:PRINT#8,GL$(GL):NEXT 835 CLOSE8:OPEN15,8,15:PRINT#15,"S0:GF/DIR" 840 PRINT#15,"R0:GF/DIR=DUMMY NAME":CLOSE15:RETURN 845 GOSUB590:PRINT"[146][144] LOADING... ";FI$" " 850 OPEN8,8,8,"0:"+FI$+",S,R" 855 IFLEFT$(FI$,3)="CR/"THENFORCR=1TO46:INPUT#8,CR$(CR):NEXT:GOTO865 860 FORS1=1TO23:FORS2=1TO38:INPUT#8,SC$(S1,S2):NEXT:NEXT 865 CLOSE8:F2$=FI$:CY$=SC$(1,1):CH$=SC$(1,1):RETURN 870 BO=4:BA=15:CA=4:CX=0:GOSUB585:GOSUB590:PRINT""; 875 IFLEFT$(FI$,3)<>"CR/"THEN885 880 FORCR=1TO46STEP2:PRINT""CR$(CR);CR$(CR+1):NEXT:GOTO890 885 FORS1=1TO23:PRINT"";:FORS2=1TO38:PRINTSC$(S1,S2);:NEXT:PRINT"":NEXT 890 F2$=FI$:IFRO=0THEN910 895 PRINTSQ$"[156]";:ONROGOTO895,900,895,900,895,905,900 900 PRINT" [144]F2[156]:SAVE, [144]F4[156]:GAR/COL, [144]F5[156]:PAINT, [144]F7[156]:PLOT[145]":GOTO910 905 PRINT" PRESS [144]F1[156] TO RETURN TO OPTIONS MENU.[145]" 910 RETURN 915 CR=0:IFLEFT$(GL$(FL),3)="CR/"THEN120 920 LG=LG+1:IFLG=55THENLG=54:GOTO120 925 IFGL$(FL)<>F2$THENFI$=GL$(FL):GOSUB845 930 GOSUB590:IFLEN(FI$)>13THENFI$=LEFT$(FI$,13) 935 FI$="CR/"+FI$:PRINT"[146][144] CRUNCHING... ";FI$:OPEN8,8,8,"0:"+FI$+",S,W" 940 S1$="":S2$="":FORS1=1TO23:S1$=SC$(S1,1):SC$(S1,1)="":L1$=LEFT$(S1$,2) 945 RV$=LEFT$(L1$,1):CO$=RIGHT$(L1$,1):FORS2=2TO19:S2$=SC$(S1,S2) 950 SC$(S1,S2)="":L2$=LEFT$(S2$,2):IFL2$=L1$THENS1$=S1$+RIGHT$(S2$,1):GOTO990 955 L1$=L2$:VR$=LEFT$(L2$,1):OC$=RIGHT$(L2$,1) 960 IFVR$<>RV$THENIFOC$<>CO$THENS1$=S1$+S2$:RV$=VR$:CO$=OC$:GOTO990 965 IFVR$=RV$THEN975 970 RV$=VR$:S1$=S1$+VR$ 975 IFOC$=CO$THEN985 980 CO$=OC$:S1$=S1$+OC$ 985 S1$=S1$+RIGHT$(S2$,1) 990 NEXT:SX$=S1$:S1$=SC$(S1,20):SC$(S1,20)="":L1$=LEFT$(S1$,2) 995 RV$=LEFT$(S1$,1):CO$=RIGHT$(L1$,1):FORS2=21TO38:S2$=SC$(S1,S2) 1000 SC$(S1,S2)="":L2$=LEFT$(S2$,2) 1005 IFL2$=L1$THENS1$=S1$+RIGHT$(S2$,1):GOTO1045 1010 L1$=L2$:VR$=LEFT$(L2$,1):OC$=RIGHT$(L2$,1) 1015 IFVR$<>RV$THENIFOC$<>CO$THENS1$=S1$+S2$:RV$=VR$:CO$=OC$:GOTO1045 1020 IFVR$=RV$THEN1030 1025 RV$=VR$:S1$=S1$+VR$ 1030 IFCO$=OC$THEN1040 1035 CO$=OC$:S1$=S1$+OC$ 1040 S1$=S1$+RIGHT$(S2$,1) 1045 NEXT:PRINT#8,SX$:PRINT#8,S1$:CR=CR+2:CR$(CR-1)=SX$:SX$="":CR$(CR)=S1$ 1050 S1$="":NEXT:CLOSE8:GOSUB590:GL$(LG)=FI$:GOSUB830:F2$=FI$:CR=0:GOTO120